package edu.nuc.event.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Competition {

    private int id;
    private String cpname;//赛事的名称
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date cpstime;//赛事开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date cpetime;//赛事结束时间
    private String cpintro;//赛事简介
    private int plid;//赛事场地ID
    private String cptype;//赛事类别


    //新增属性
    private Integer comcount;//赛事的数量
    private String complace;//赛事场地
    private Place place;//赛事场地

    @Override
    public String toString() {
        return "Competition{" +
                "id=" + id +
                ", cpname='" + cpname + '\'' +
                ", cpstime=" + cpstime +
                ", cpetime=" + cpetime +
                ", cpintro='" + cpintro + '\'' +
                '}' + "\n";
    }
}
